# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>

pkgname=python-googleapis-common-protos
pkgver=1.59.0
pkgrel=2
pkgdesc="Python classes generated from the common protos in the googleapis repository"
arch=('any')
url="https://github.com/googleapis/googleapis"
license=('Apache')
depends=('python-protobuf')
optdepends=('python-grpcio: for grpc support')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/g/googleapis-common-protos/googleapis-common-protos-${pkgver}.tar.gz")
sha256sums=('4168fcb568a826a52f23510412da405abd93f4d23ba544bb68d943b14ba3cb44')

build() {
  cd "googleapis-common-protos-${pkgver}"

  python -m build --wheel --no-isolation
}

package() {
  cd "googleapis-common-protos-${pkgver}"

  python -m installer --destdir="$pkgdir" dist/*.whl

  chmod -R +r "${pkgdir}"
}
